package com.west.xu.jdbc.utils;

import org.apache.commons.lang.StringUtils;

import java.util.Map;

public class ValidateUtil {
    public static boolean strIsNotEmpty(String source) {
        return StringUtils.isNotEmpty(source);
    }

    public static boolean strIsNotBlank(String source) {
        return StringUtils.isNotBlank(source);
    }

    public static boolean objectIsNotNull(Object object) {
        return object != null;
    }

    public static boolean mapContainKeys(Map<Object, Object> map, String... keys) {
        for (String key : keys) {
            if (!map.containsKey(key) || "".equals(map.get(key))) {
                return false;
            }
        }
        return true;
    }
}
